package org.etom.connector.datatypes;

import org.etom.connector.service.ConnectorException;

/**
 * The Moodle course represents one of the courses of the user.
 * The details about the course are read from Moodle server.
 */
public interface IMoodleCourse {
  
  /**
   * The method gives a full name of the course.
   * That name is used in the web interface.
   * 
   * @return - the full (datailed) name of the course
   */
  public String getFullName();
  
  /**
   * The method returns the identifier of the course.
   * The identifier is server unique.
   * 
   * @return - the identifier of the course.
   */
  public Long getId();
  
  /**
   * The method returns the course modules.
   * The modules are filtered by the connection user
   * i.e. these modules can be a sub-set of the all modules in the course.
   * 
   * @param type - the module type, the type are defined in
   *  <code>org.etom.connector.datatypes.IMoodleModule</code>
   * @return the course module for the connection user
   * 
   * @throws ConnectorException - if an error is occurred during the operation
   */
  public IMoodleModule[] getModules(int type) throws ConnectorException;
  
  /**
   * The method returns the user which course is this.
   * 
   * @return - moodle user which course is this
   */
  public IMoodleUser getUser();
  
}
